<template>
    <div id="login">
        <Header></Header>
        <div class="center tonglan" :style="background">
            <div class="title">
                <div>{{$route.query.c_title}}</div>
                <div>{{$route.query.e_title}}</div>
            </div>
        <div style="display: flex;justify-content: center;align-items: center">
            <div class="login_outside">
                <table >
                    <tr>
                        <td><p>用户名</p></td>
                        <td> <input class="username" v-model="username"></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td> <span class="span1">用户名为用企业英文简称，5-25个字符</span></td>
                    </tr>
                    <tr>
                        <td><p>密码</p></td>
                        <td><input class="username" v-model="password"></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><span>6-15位英文和数字组合</span></td>
                    </tr>
                </table>
                <div v-if="this.loginMode === '提供商登录'">
                    <div class="button" @click="FWS_Login">登录</div>
                </div>
                <div v-else-if="this.loginMode === '企业登录'">
                    <div class="button" @click="QY_Login">登录</div>
                </div>
                <div v-else-if="this.loginMode === '管理员登录'">
                    <div class="button" @click="Admin_Login">登录</div>
                </div>
                <div v-else>
                    <div class="button" @click="Admin_Login">登录</div>
                </div>

            </div>
        </div>

        </div>
        <Footer></Footer>
    </div>

</template>

<script>
    import Header from "@/components/content/header/Header";
    import Footer from "@/components/content/footer/Footer";
    import {getAction,postAction} from "@/network/manage";
    export default {
        name: "login",
        components: {
            Header,
            Footer,
            getAction,
            postAction
        },
            data(){
                return{
                    loginMode:'',
                    username:'',
                    password:''
                }
            },
        created() {
            this.loginMode=this.$route.query.c_title;
        },
        methods:{
            FWS_Login(){
                var formdata=new FormData();
                formdata.append("username",this.username);
                formdata.append("password",this.password);
                postAction('/UserWorkbench/getSolutions').then((res)=>{
                    console.log(res);
                    console.log('sssssssssss');
                    // window.open(`/html/providers/FWS_workbench.html`);

                })
            },
            QY_Login(){
                alert("企业");
            },
            Admin_Login(){
                alert("管理员");
            }

        },
         computed:{
                background:function(){
                    return {
                        height: "660px",
                        backgroundImage:"url("+this.$route.query.imgurl+")",
                        backgroundRepeat:'no-repeat',
                        backgroundSize:"100% 660px",
                    }
                }
            }
    }
</script>

<style scoped>
    .title{
        font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;
        font-weight: 700;
        font-style: normal;
        color: #FFFFFF;
        font-size: 30px;
        padding-top: 60px;
        padding-left: 120px;
    }
    .login_outside{
        width: 436px;
        height: 352px;
        background-color: rgba(255, 255, 255, 0.8);
        border: none;
        border-radius: 20px;
        font-size: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

    }
    .login_outside span{
        font-size: 14px;
        color: #7F7F7F;
        margin-bottom: 60px;
    }
    .login_outside input{
        width: 255px;
        height: 33px;
    }
    .login_outside .button{
        width: 193px;
        height: 34px;
        font-size: 14px;
        color: white;
        background: url("~@/assets/image/login/button.svg");
        text-align: center;
        line-height: 34px;
        margin-top: 30px;
    }
    .login_outside p{
       margin-right: 30px;
    }
</style>
